{{!
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements.  See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership.  The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License.  You may obtain a copy of the License at
*
*     http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
}}
<div class="well">
  <div class="form-group">
    <label class="control-label col-xs-2">Coordinator Path<span class="requiredField">&nbsp;*</span></label>
    <div class="col-xs-7">
      <div class="input-group">
        {{input type="text" class="form-control" name="appPath" focus-out="showCoordinatorName" value=coordinator.appPath placeholder="Path of the coordinator file"}}
        <span class="input-group-btn">
          <button class="btn btn-secondary" type="button" {{action "openFileBrowser" "coordinator.appPath"}}>Browse</button>
          <button class="btn btn-default" type="button" disabled={{containsParameteriedPaths}} title={{parameterizedPathWarning}} {{action "openTab" 'coord' coordinator.appPath}} name="button"><i class="fa fa-external-link"></i></button>
        </span>
      </div>
      {{#if coordNameFetchingInProgress}}
        {{spin-spinner lines=8 length=5 width=3 radius=5 top=16 left=440}}
      {{/if}}
      {{#field-error model=this field='coordinator.appPath' showErrorMessage=showErrorMessage}}{{/field-error}}
    </div>
  </div>
  <div class="form-group">
    <label class="control-label col-xs-2">Coordinator Name<span class="requiredField">&nbsp;*</span></label>
    <div class="col-xs-7">
      {{input type="text" class="form-control" name="name" value=coordinator.name placeholder="Coordinator Name"}}
      {{#field-error model=this field='coordinator.name' showErrorMessage=showErrorMessage}}{{/field-error}}
    </div>
  </div>
  <div class="panel panel-default">
    <div class="panel-heading">Configuration</div>
    <div class="panel-body handlerPanel">
      {{#name-value-config configuration=coordinator.configuration}}{{/name-value-config}}
    </div>
  </div>
  <div class="form-group">
    <div class="col-xs-7 pull-right">
      <button id="coordinator-cancel-btn" {{action 'cancelCoordinatorOperation'}} type="button" class="btn btn-default">Cancel</button>
      {{#if createMode}}
      <button id="coordinator-add-btn" {{action 'addCoordinator'}} type="button" class="btn btn-primary">Add</button>
      {{else}}
      <button id="coordinator-update-btn" {{action 'updateCoordinator'}} type="button" class="btn btn-primary"> Update </button>
      {{/if}}
    </div>
  </div>
</div>
